package com.tianhui.consignortwofei.pattern.orderOprate.impl.insure;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.fgs.common.utils.ToastUtil;
import com.tianhui.consignortwofei.constant.KeyValue;
import com.tianhui.consignortwofei.mvp.model.enty.OrderOperateInfo;
import com.tianhui.consignortwofei.mvp.ui.activity.InsureDetailActivity;
import com.tianhui.consignortwofei.pattern.orderOprate.IOrderOperate;

/**
 * @author fgs
 * @date 2020/9/24
 * @description 投保明细
 **/
public class InsureDetailOperate implements IOrderOperate {
    @Override
    public void orderOperate(Context context, OrderOperateInfo operateInfo) {
        if (operateInfo.orderInfo == null){
            ToastUtil.showShortToast("未查到投保信息");
            return;
        }
        Intent intent = new Intent(context, InsureDetailActivity.class);
        Bundle bundle = new Bundle();
        bundle.putParcelable(KeyValue.KEY_ORDER_INFO, operateInfo.orderInfo);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
}
